package com.ssm.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ssm.base.BaseDao;
import com.ssm.base.BaseServiceImpl;
import com.ssm.dao.UserInfoDao;
import com.ssm.entity.UserInfo;
import com.ssm.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Author jie_ge
 * @Date 2022/4/21
 */
@Service(interfaceClass = UserInfoService.class)
public class UserInfoServiceImpl extends BaseServiceImpl<UserInfo> implements UserInfoService {
    @Autowired
    private UserInfoDao userInfoDao;
    @Override
    protected BaseDao<UserInfo> getEntityDao() {
        return userInfoDao;
    }

    /**
     * 根据手机号查询
     * @param phone
     * @return
     */
    @Override
    public UserInfo getByPhone(String phone) {
        return userInfoDao.getByPhone(phone);
    }

    @Override
    public List<UserInfo> findAll() {
        return userInfoDao.findAll();
    }
}
